<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "orders".
 *
 * @property integer $order_id
 * @property integer $user_id
 * @property integer $order_type
 * @property string $order_name
 * @property string $order_image
 * @property string $order_goto_url
 * @property string $order_hint_name
 * @property string $order_day_rate
 * @property string $order_desc
 * @property integer $order_num
 * @property integer $order_money
 * @property integer $order_sort
 * @property string $order_rate_name
 */
class Orders extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'orders';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['user_id', 'order_type', 'order_num', 'order_money', 'order_sort'], 'integer'],
            [['order_name'], 'string', 'max' => 30],
            [['order_image', 'order_goto_url','order_rate_name'], 'string', 'max' => 255],
            [['order_hint_name', 'order_day_rate'], 'string', 'max' => 25],
            [['order_desc'], 'string', 'max' => 100],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'order_id' => '贷款id',
            'user_id' => '用户id',
            'order_type' => '贷款方式',
            'order_name' => '贷款客户名字',
            'order_image' => '贷款客户图片',
            'order_goto_url' => '贷款跳转链接',
            'order_hint_name' => '提示名字',
            'order_rate_name'=>'日率或者月率',
            'order_day_rate' => '日率',
            'order_desc' => '贷款描述',
            'order_num' => '人数',
            'order_money' => '金钱',
            'order_sort' => '排序',
        ];
    }
}
